<template>
    <div>
        <breadcrumb :routerList="routerList"></breadcrumb>
		<searchAre ></searchAre>
		<tableAre :goodsList="goodsList"></tableAre>
        <paginationAre :total="total" @currentChange="currentChange"></paginationAre>
    </div>
</template>

<script>
import breadcrumb from '@/components/breadcrumb.vue'
import paginationAre from '@/components/paginationAre.vue'
import searchAre from '@/components/fxGoods/fxGoodsSearch.vue'
import tableAre from '@/components/fxGoods/fxGoodsTable.vue'

export default {
    components: {breadcrumb,paginationAre,searchAre,tableAre},
    data(){
        return {
            routerList: [
                {
                    name: '商品管理',
                    path: ''
                },
                {
                    name: '会员商品列表',
                    path: ''
                },
            ],
			total:0,
			goodsList:[],
			num:this.$store.state.pageNum,
			page:1,
			status:10,
			shop_id:""
        }
    },
    created(){
		this.getGoodsList()
    },
    methods:{
		//获取商品列表
		async getGoodsList(){
			let res = await this.$Http.getFxGoodsList({
				num:this.num,
				p:this.p,
				name:this.name,
				status:this.status,
				shop_id:this.shop_id,
			})
			console.log(res)
			this.goodsList = res.list;
			this.total = Number(res.count)
		},
        currentChange(currentPage){
            this.page = currentPage
        },
    }
}
</script>

<style>

</style>
